﻿namespace EveKillboard.Core.Views
{
    using System.ComponentModel.DataAnnotations;
    using System;

    public interface IMonthView {}
    public interface IWeekView {}
    public interface IKillsView {}
    public interface ILossesView {}
    public interface IValueView {}
    public interface ICorporationView{}
    public interface ICharacterView {}
    public interface IAllTimeView {}

    public interface ICount
    {
        int Count { get; set; }
    }

    public interface ITopView : ICount
    {
        int InternalId { get; set; }
        string Name { get; set; }
        int EveId { get; set; }
        decimal Value { get; set; }
    }

    public abstract class TopView : ITopView
    {
        public virtual int InternalId { get; set; }
        public virtual string Name { get; set; }
        public virtual int EveId { get; set; }
        public virtual int Count { get; set; }
        public virtual decimal Value { get; set; }
    }

    #region Characters

    [Table("TopCharacterKillsValueMonthView")]
    public class TopCharacterKillsValueMonthView : TopView, IMonthView, IKillsView, IValueView, ICharacterView
    {
        [Key]
        [Column("CharacterInternalID")]
        public override int InternalId { get; set; }
        [Column("CharacterName")]
        public override string Name { get; set; }
        [Column("CharacterEveId")]
        public override int EveId { get; set; }
        [NotMapped]
        public override int Count { get; set; }
        [Column("Value")]
        public override decimal Value { get; set; }
        [Column("Year")]
        public short Year { get; set; }
        [Column("Month")]
        public short Month { get; set; }
    }
    [Table("TopCharactersKillsMonthView")]
    public class TopCharacterKillsMonthView : TopView, IMonthView, IKillsView, ICharacterView
    {
        [Key]
        [Column("CharacterInternalID")]
        public override int InternalId { get; set; }
        [Column("CharacterName")]
        public override string Name { get; set; }
        [Column("CharacterEveId")]
        public override int EveId { get; set; }
        [Column("Kills")]
        public override int Count { get; set; }
        [Column("Year")]
        public short Year { get; set; }
        [Column("Month")]
        public short Month { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
    }
    [Table("TopCharactersKillsWeekView")]
    public class TopCharacterKillsWeekView : TopView, IWeekView, IKillsView, ICharacterView
    {
        [Key]
        [Column("CharacterInternalID")]
        public override int InternalId { get; set; }
        [Column("CharacterName")]
        public override string Name { get; set; }
        [Column("CharacterEveId")]
        public override int EveId { get; set; }
        [Column("Kills")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public short Year { get; set; }
        [Column("Month")]
        public short Month { get; set; }
        [Column("Week")]
        public short Week { get; set; }
    }

    [Table("TopCharactersLossesMonthView")]
    public class TopCharacterLossesMonthView : TopView, IMonthView, ILossesView, ICharacterView
    {
        [Key]
        [Column("CharacterInternalID")]
        public override int InternalId { get; set; }
        [Column("CharacterName")]
        public override string Name { get; set; }
        [Column("CharacterEveId")]
        public override int EveId { get; set; }
        [Column("Losses")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public short Year { get; set; }
        [Column("Month")]
        public short Month { get; set; }
    }
    [Table("TopCharactersLossesWeekView")]
    public class TopCharactersLossesWeekView : TopView, IWeekView, ILossesView, ICharacterView
    {
        [Key]
        [Column("CharacterInternalID")]
        public override int InternalId { get; set; }
        [Column("CharacterName")]
        public override string Name { get; set; }
        [Column("CharacterEveId")]
        public override int EveId { get; set; }
        [Column("Losses")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public short Year { get; set; }
        [Column("Month")]
        public short Month { get; set; }
        [Column("Week")]
        public short Week { get; set; }
    }
    #endregion

    #region Corporations

    [Table("TopCorpsKillsView")]
    public class TopCorporationKillsView : TopView, IMonthView, IKillsView, ICorporationView
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationEveID")]
        public override int EveId { get; set; }
        [Column("Kills")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("AllianceInternalID")]
        public int AllianceInternalId { get; set; }
        [Column("Year")]
        public Int16 Year { get; set; }
        [Column("Month")]
        public Int16 Month { get; set; }
        [Column("Week")]
        public Int16 Week { get; set; }
    }


    [Table("TopCorpsKillsMonthView")]
    public class TopCorporationsKillsMonthView : TopView, IMonthView, IKillsView, ICorporationView
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationEveID")]
        public override int EveId { get; set; }
        [Column("Kills")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public Int16 Year { get; set; }
        [Column("Month")]
        public Int16 Month { get; set; }
    }
    [Table("TopCorpsKillsWeekView")]
    public class TopCorporationsKillsWeekView : TopView, IWeekView, IKillsView, ICorporationView
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationEveID")]
        public override int EveId { get; set; }
        [Column("Kills")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public Int16 Year { get; set; }
        [Column("Month")]
        public Int16 Month { get; set; }
        [Column("Week")]
        public Int16 Week { get; set; }

    }
    [Table("TopCorpsLossesView")]
    public class TopCorporationsLossesView : TopView, IMonthView, ILossesView, ICorporationView
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationEveID")]
        public override int EveId { get; set; }
        [Column("Losses")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("AllianceInternalID")]
        public int AllianceInternalId { get; set; }
        [Column("Year")]
        public Int16 Year { get; set; }
        [Column("Month")]
        public Int16 Month { get; set; }
        [Column("Week")]
        public Int16 Week { get; set; }
    }


    [Table("TopCorpsLossesMonthView")]
    public class TopCorporationsLossesMonthView : TopView, IMonthView, ILossesView, ICorporationView
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationEveID")]
        public override int EveId { get; set; }
        [Column("Losses")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public Int16 Year { get; set; }
        [Column("Month")]
        public Int16 Month { get; set; }
    }

    [Table("TopCorpsLossesWeekView")]
    public class TopCorporationsLossesWeekView : TopView, IWeekView, ILossesView, ICorporationView
    {
        [Key]
        [Column("CorporationInternalID")]
        public override int InternalId { get; set; }
        [Column("CorporationName")]
        public override string Name { get; set; }
        [Column("CorporationEveID")]
        public override int EveId { get; set; }
        [Column("Losses")]
        public override int Count { get; set; }
        [NotMapped]
        public override decimal Value { get; set; }
        [Column("Year")]
        public Int16 Year { get; set; }
        [Column("Month")]
        public Int16 Month { get; set; }
        [Column("Week")]
        public Int16 Week { get; set; }

    }
    #endregion
}